<template>
	<view>
		<!-- 404页面 -->
		<view class="noData" v-if="netWorkType == 'none'">
			<noData @handle="refresh"></noData>
		</view>
		<view v-if="netWorkType != 'none'" class="page" >
			<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx"></tui-skeleton>
			<view class="head-info"	:style="'margin-top:'+pageTop+'rpx;'"	>  <!-- :style="'background-size: 100%;  background: linear-gradient(180deg, #20B5FF 0%, #d9d9d900 100%);padding-bottom: 90rpx;'" -->
				<view  class="head-title">
					<view class="img-logo">
						<image :src="OSS_HOST+'img/logo.png'" mode="widthFix"></image>
					</view>
					<view class="name">
						麦麦香烘焙
					</view>
					
				</view>
				
				
				<!-- 分类列表 -->
				<!-- <view class="classify-list">
					<view class="list" v-for="(item,index) in classList"
					:class="{'action':classifyShow==index}"
					@click="onClassify(item,index)"
					:key="index">
						
						<view v-if="index == 0" class="img"> <img class="tejia"  :src="OSS_HOST+'img/tejia.gif'"  alt="" mode="aspectFill"  ></view>
						
						<view v-else class="class-name">
							<view ><text>{{item.name}}</text></view>
							 <view class="class-icon"><text class="iconfont line" v-show="classifyShow==index">&#xe63f; </text></view>
							
						</view>
						
					</view>
				</view> -->

				<!-- 服务 -->
				<view class="server-box">
					<!-- 			<view @tap="onTips('shangshi')">
					<text class="iconfont">&#xe640;</text>
					<text>隶属上市体系</text>
				</view>
				<view>
					<text class="iconfont">&#xe641;</text>
					<text>100%正品保障</text>
				</view>
				<view>
					<text class="iconfont">&#xe642;</text>
					<text>品类齐全</text>
				</view>
				<view  @tap="onTips('cert')">
					<text class="iconfont">&#xe643;</text>
					<text>资质认证</text>
				</view> -->

				</view>
			</view>

			<view class="main" :style="'margin-top: calc(20rpx + '+ pageTop +'rpx)'" >
				<!-- banner 686*300 -->
				<view class="banner">
					<swiper class="screen-swiper square-dot" indicator-dots="true" circular="true" autoplay="true" interval="5000" duration="500">
						<swiper-item v-for="(item,index) in bannerList" :key="index"  @click.stop="toBannerUrl(item.miniProgramPath)">
							<image :src="item.src" mode="aspectFill"></image>
							<video :src="item.src" v-if="item.type=='video'" 	controls  loop muted></video>
							<!-- <video src="{{item.url}}" autoplay loop muted show-play-btn="{{false}}" controls="{{false}}" objectFit="cover" wx:if="{{item.type=='video'}}"></video> -->
						</swiper-item>
					</swiper>
				</view>
				<!-- 菜单导航 -->
				<view class="nav-list">
					<view class="list"  v-for="item1 in data.nav" @click="toDetail(item1)">
						<view class="thumb">
							<image :src="item1.src"></image>
						</view>
						<view class="name"><text class="one-omit">{{item1.name}}</text></view>
					</view>
					<!-- <swiper  class="Nsquare-dot" style="height: 160rpx;" indicator-active-color="#20B5FF"  indicator-dots="true" circular="true" >
					
						<swiper-item  style="display: flex;flex-wrap: wrap;height: 380rpx;"  v-for="(item, index) in nav" >
							<view class="list"  v-for="item1 in item" @click="todetail(item1)">
								<view class="thumb">
									<image :src="item1.src"></image>
								</view>
								<view class="name"><text class="one-omit">{{item1.name}}</text></view>
							</view>
						</swiper-item>
					</swiper> -->
				</view>
				<!--  -->
				<!-- <view class="rec-goods" @tap="toActivity()">
				<image :src="headerimg"  mode="scaleToFill"></image>
			</view> -->
				<!-- <view class="inlet">
				<view class="inlet-box">
					<view class="img">
						<image :src="OSS_HOST+'img/oxzl.png'" mode="aspectFill" @tap="tozhulin"></image>
					</view>
				</view>
				<view class="inlet-box">
					<view class="img">
						<image :src="OSS_HOST+'img/xuetang.png'" mode="aspectFill" @tap="toXuetang('血糖专区')"></image>
					</view>	
					
				</view>
			</view> -->
				<!-- <view class="super-hot-style">
			
				<view class="hot-title">
					
			
					<view class="title"><image :src="OSS_HOST+'img/day-tejia.png'" mode="aspectFit" ></image></view>
					<view class = "most" @tap="toMost('每日特价')">更多	<text class="iconfont " style="color: #000;">&#xe626;</text></view>
				</view>
				<view class="goods-list">
					<view class="list" v-for="(item, index) in data.hotProduct" @click="onSkip('goods',item.id)" :key="index">
						<view class="thumb">
							<image :src="item.cover_image" mode="widthFix"></image>
						</view>
						<view class="title"><text class="one-omit">{{item.name}}</text></view>
						<view class="price">
							<view class="retail-price">
								<text class="min">￥</text>
								<text class="max">{{item.price}}</text>
							</view>
							<view class="sales-volume">已售{{item.sale_count}}件</view>
						</view>
					</view>
				</view>
			</view> -->
				<!-- 专区 -->
				<!-- <view class="zhuanqu">
				<view class="zhuanqu-box"  v-for="row in data.tempList" >
					<view class="title">
						
						<image :src="row.cover_image" mode="heightFix" ></image>
						<view class = "most" @tap="tozhuanqu(row)">更多	<text class="iconfont " style="color: #808080;">&#xe626;</text></view>
						
						
					</view>
					<view class="goods-list">
						<view class="list" v-for="(item, index) in row.sub"   @click="onSkip('goods',item.id)">
							<view class="thumb">
								<image :src="item.cover_image" mode="widthFix"></image>
							</view>
							<view class="title"><text class="one-omit">{{item.name}}</text></view>
							<view class="price">
								<view class="retail-price">
									<text class="min">￥</text>
									<text class="max">{{item.price}}</text>
								</view>
								<view class="sales-volume">已售{{item.sale_count}}件</view>
							</view>
						</view>
					</view>
				
				</view>
				
			</view> -->
				<!-- 欧械租赁 -->
				<!-- <view class="activity-zl">
				<view class="image"  @tap="tozhulin">
					<image :src="OSS_HOST+'img/zulin-img.png'" mode="aspectFit" ></image>
				</view>
			</view> -->
				<!-- 为你推荐 -->
				<view class="recommend-info">
					<!-- <view class="recommend-title">
						<view class="title">
							<text class="left"></text>
							为你推荐
							<text class="right"></text>
							
						</view>
					</view> -->
					<view class="goods-list">
						<view class="list" v-for="(item,index) in productList" @click="onSkip('goods',item.id)" :key="index">
							<view class="pictrue">
								<image :src="item.cover_image" mode="heightFix"></image>
							</view>
							<view class="title-tag">
								<view class="tag">
									<text v-if="item.is_goods === 1">特价</text>
									{{item.name}}
								</view>
							</view>
							<view class="price-info">
								<view  class="user-price">
									<text style="color:#FF5733;font-size: 10px;font-weight: bold;" class="min">￥</text>
									<text style="color:#FF5733;font-size: 14px;font-weight: bold;" class="max">{{item.price}}</text>
									<!-- <text style="color:#999999;font-size: 10px;padding-left:2px;text-decoration:line-through;">￥{{item.cost}}</text> -->
								</view>
								<view class="cart">
									<view class='iconfont icon'>&#xe656;</view>
								</view>
								<!-- <view class="vip-price">
								
									<text style="color:#999999;font-size: 10px;">已售{{item.sale_count}}件</text>
								</view> -->
							</view>
						</view>
					</view>
				</view>
		
			</view>
			<!--  v-show="classifyShow!=0" -->
			<!-- <ClassifyData :title="aa" :hotList="hotList" v-if="reset" :propertyList="propertyList"
				:productList="productList" :bannerList="bannerList" :hotProduct="data.hotProduct"
				:tempList="data.tempList" :bargain="data.bargain" :nav="data.nav" :loginStatus='loginStatus' :pageTop="pageTop">
			</ClassifyData> -->
			<!-- tabbar 底部导航   :productList="productList"-->
			<TabBar :tabBarShow="0" :pageBottom="pageBottom"></TabBar>
		</view>
		<!-- 提示弹框 -->
		<tui-tips ref="toast"></tui-tips>
		<uni-popup ref="tipContent" type="bottom" :bg="false" :custom="true">
			<view class="content-cert">
				<view class="title"> {{title}}</view>
				<view class="close-btn" @tap="$refs.tipContent.close()">x</view>
				<view v-for="item in tips">
					<image :src="item.src" mode="widthFix" style="width: 750rpx;"></image>
				</view>
			</view>

		</uni-popup>
		<!-- 登录弹框 -->
		<uni-popup-vlogin id="popupvLogin" ref="popupvLogin" type="bottom" />
	</view>

</template>


<script>
	// 骨架
	import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
	//获取网络状态
	import {
		mapGetters
	} from 'vuex';
	import TabBar from '@/components/TabBar/TabBar.vue';
	import ClassifyData from '@/components/ClassifyData/ClassifyData.vue';
	import uniPopup from '@/components/uni-popup/uni-popup.vue'

	import {
		oss_host
	} from '@/config/config.js';
	import store from '@/store/index.js';
	// const plugin = requirePlugin('xiaoou-plugin'); 
	export default {

		components: {
			TabBar,
			ClassifyData,
			uniPopup,
			tuiSkeleton

		},
		computed: {
			//注册网络状态
			...mapGetters(['netWorkType', 'loginStatus'])
			// 一个计算属性的 getter

		},

		data() {
			return {
				mescroll: null, // mescroll实例对象 (此行可删,mixins已默认)
				// 下拉刷新的配置(可选, 绝大部分情况无需配置)
				downOption: {},
				// 上拉加载的配置(可选, 绝大部分情况无需配置)
				OSS_HOST: oss_host,
				skeletonShow: true, //骨架
				upOption: {
					use: false
				},
				headerimg: '',
				aa: 'ceadsfdfg',
				hotList: {},
				productList: {},
				propertyList: {},
				reset: true,

				// banner
				bannerList: [

					{
						id: 5,
						type: 'image',
						url: '/static/img/banner_01.png'
					}
				],
				slideNum: 0,
				navList: [

				],
				classList: [{
						id: 0,
						name: '推荐',
					},

				],
				goodsList: [{
						id: 1,
						name: 'BANDALY 2020夏季女装连衣裙韩版大码宽松显瘦套装裙子两件套 JX19301 上豆绿下米白 M ',
						price: '219.00',
						vip_price: '129.00',
						img: '/static/img/goods_thumb_01.png',
						is_goods: 0,
					},
					{
						id: 1,
						name: '花花公子 卫衣男秋季圆领薄款休闲体恤男士时尚长袖T恤外套上衣男生情侣装套头衣服秋天男装 白色 XL',
						price: '139.00',
						vip_price: '99.00',
						img: '/static/img/goods_thumb_02.png',
						is_goods: 1,
					},
					{
						id: 1,
						name: '花花公子 卫衣男秋季圆领薄款休闲体恤男士时尚长袖T恤外套上衣男生情侣装套头衣服秋天男装 白色 XL',
						price: '139.00',
						vip_price: '99.00',
						img: '/static/img/goods_thumb_02.png',
						is_goods: 1,
					},
					{
						id: 1,
						name: '花花公子 卫衣男秋季圆领薄款休闲体恤男士时尚长袖T恤外套上衣男生情侣装套头衣服秋天男装 白色 XL',
						price: '139.00',
						vip_price: '99.00',
						img: '/static/img/goods_thumb_02.png',
						is_goods: 1,
					},
					{
						id: 1,
						name: '花花公子 卫衣男秋季圆领薄款休闲体恤男士时尚长袖T恤外套上衣男生情侣装套头衣服秋天男装 白色 XL',
						price: '139.00',
						vip_price: '99.00',
						img: '/static/img/goods_thumb_02.png',
						is_goods: 1,
					},
					{
						id: 1,
						name: '花花公子 卫衣男秋季圆领薄款休闲体恤男士时尚长袖T恤外套上衣男生情侣装套头衣服秋天男装 白色 XL',
						price: '139.00',
						vip_price: '99.00',
						img: '/static/img/goods_thumb_02.png',
						is_goods: 1,
					},
					{
						id: 1,
						name: '花花公子 卫衣男秋季圆领薄款休闲体恤男士时尚长袖T恤外套上衣男生情侣装套头衣服秋天男装 白色 XL',
						price: '139.00',
						vip_price: '99.00',
						img: '/static/img/goods_thumb_02.png',
						is_goods: 1,
					}
				],
				classifyShow: 1,
				// 页面高度
				pageHeight: 500,
				pageTop:40,//默认顶部刘海高度
				pageBottom:0,//底部 安全区域
				adv_channel: '',
				page: 0,
				lastPage: 0,
				property_id: 0,
				latitude: '', //坐标
				longitude: '',
				tips: [], // 资质、上市
				title: '', //标题
				windowHeight: '',
				
				data: {
					product: [],
					property: [],
					tempList: [], //
					bargain: [], //砍价

					shangshi: [], //图片
					cert: [

					],
					nav: [
						
					],
				}
			}
		},
		onReady() {
			uni.hideTabBar();
			// #ifdef MP
			uni.setNavigationBarTitle({
				title: '首页',
			})
			uni.setNavigationBarColor({
				frontColor: '#ffffff',
				backgroundColor: '#fe3b0f',
			})
			// #endif

		},
		onShareAppMessage: function() {
			const _this = this;

			const shareTitle = '麦麦香烘焙'
			const shareText = _this.data.detail.name
			return {
				title: shareTitle, //标题
				desc: shareTitle,
				path: `/pages/home/home?user_id=${_this.data.userInfo.id||''}`, // 路径，传递参数到指定页面。
				// imageUrl: _this.data.detail.cover_image,

			}
		},
		onLoad: function(e) {
			let that = this;
			// console.log(e)
			//  只能在对应的功能上让用户授权 ，在这授权会被举报封禁权限
			// uni.getLocation({
			// 	//#ifdef  MP-WEIXIN
			// 	type: 'gcj02', //返回可以用于uni.openLocation的经纬度
			// 	//#endif
			// 	success: function(res) {
			// 		that.latitude = res.latitude;
			// 		that.longitude = res.longitude;  
			// 		uni.setStorageSync('loginlat',res.latitude)
			// 		uni.setStorageSync('loginlng',res.longitude) 

			// 	}
			// });

			uni.getSystemInfo({
				success: function(res) {
					// console.log(res,'手机信息')
					// that.widowWidth = res.widowWidth;2
					that.windowHeight = res.windowHeight * 2;
					console.log(res.safeAreaInsets.top,'****top*****')
					that.pageTop =res.safeAreaInsets.top>0?res.safeAreaInsets.top *2:40; //头部刘海
					that.pageTop = that.pageTop + 10;
					that.pageBottom = res.safeAreaInsets.bottom *2 //底部刘海

				}
			})
			
			console.log(that.pageTop)
			// console.log(e)
			
			// that.adv_channel = uni.getStorageSync('adv_channel');
			if (typeof e != "undefined") {
				if (typeof e.q != "undefined") {
					// 扫码进入
					let scene = decodeURIComponent(e.q)
					// store.dispatch('setPromotionId', this.getQueryVariable('promotion_id', scene))
					let inviteUserId = this.$service.getQueryVariable('user_id', scene)
					// 邀请人id
					uni.setStorageSync('inviteUserId', inviteUserId);
					// 专属 推广员
					let assertUserId = this.$service.getQueryVariable('assert_user_id', scene)
					uni.setStorageSync('assertUserId', assertUserId);
					// console.log(assertUserId,'assertUserId*****')
					// that.adv_channel = adv_channel
				}
				if (typeof e.user_id != 'undefined') {
					// 分享
					uni.setStorageSync('inviteUserId', e.user_id);
				}

			}

			// if(typeof e.openid !='undefined'){
			// 	// 瓯品小程序跳转 
			// 	uni.setStorageSync('oldOpenid', e.openid);
			// }
			// if(that.loginStatus){
			// 	that.getUserInfo();
			// 	return
			// }
			// that.adv_channel = 'xfl'
			this.page = 0
			this.getList(); // 获取消息 
			this.$nextTick(() => {
				this.hackReset = true;
			})

		},
		onPageScroll(e) {
			let scrollTop = e.scrollTop;
			// if(scrollTop > 0){
			// 	this.pageHeight = 210;
			// }else{
			// 	this.pageHeight = 500;
			// }
		},
		onReachBottom() {
			// 分页 上拉加载
			if (this.page >= this.lastPage) {
				// console.log(1111111)
				uni.showToast({
					icon: 'none',
					title: '没有更多数据'
				});
				return;
			}

			this.getProduct();

		},
		methods: {
			/*下拉刷新的回调, 有三种处理方式:*/
			downCallback() {
				this.page = 0
				// this.getList();	// 获取消息
				this.getProduct();
				// this.mescroll.endSuccess();

			},
			onReachBottom() {
				// 分页 上拉加载
				if (this.page >= this.lastPage) {
					// console.log(1111111)
					uni.showToast({
						icon: 'none',
						title: '没有更多数据'
					});
					return;
				}

				this.getProduct();

			},
			// 扫码
			scanCode() {
				let _this = this;
				uni.scanCode({
					onlyFromCamera: true,
					success: function(res) {
						console.log(res)
						//二维码
						if (res.scanType == 'QR_CODE') {

							let scene = decodeURIComponent(res.result)
							// store.dispatch('setPromotionId', this.getQueryVariable('promotion_id', scene))
							let inviteUserId = _this.$service.getQueryVariable('user_id', scene)
							let id = _this.$service.getQueryVariable('id', scene)
							// 邀请人id
							uni.setStorageSync('inviteUserId', inviteUserId);
							_this.$refer.setVilit('/pages/GoodsDetails/GoodsDetails')
							let callback = function(url) {
								_this.$refs.popupvLogin.open()
							}
							var data = {
								id: id
							}
							_this.$refer.toUrl(callback, data)

						} else {
							// 条码
							const code = res.result
							_this.$refer.setVilit('/pages/GoodsDetails/GoodsDetails')
							let callback = function(url) {
								_this.$refs.popupvLogin.open()
							}
							var data = {
								code: code
							}
							_this.$refer.toUrl(callback, data)
						}

					}

				});
			},
			/*上拉加载的回调*/
			// upCallback(page) {

			// },
			getList() {
				const _this = this

				var opt = {
					url: '/index/index',
					data: {
						property_id: this.property_id || 2,
						lat: this.latitude || 22.81194,
						lng: this.longitude || 108.393005,
						// adv_channel:this.adv_channel
					},
					success: function(res) {

						if (res.status == 1) {
							let result = res.data
							_this.skeletonShow = false
							_this.bannerList = res.data.bannerList
							_this.data.product = res.data.product
							
							// console.log(_this.data.hotProduct)
							//格式化有序数据 {{...}} =》[{}]
							_this.data.property = Object.values(result.property)
							// console.log('*****',_this.data.property[0].id)
							_this.property_id = _this.data.property[0].id
							_this.data.tempList = result.tempList || []
							let OSS_HOST = _this.OSS_HOST
							// let nav = [
							// 	{
							// 		id:1,
							// 		name:'面包类',
							// 		src:OSS_HOST+'img/home_nav_1.png'
							// 	},
							// 	{
							// 		id:2,
							// 		name:'蛋糕类',
							// 		src:OSS_HOST+'img/home_nav_2.png'
							// 	},
							// 	{
							// 		id:3,
							// 		name:'奶油蛋糕',
							// 		src:OSS_HOST+'img/home_nav_3.png'
							// 	},
							// 	{
							// 		id:4,
							// 		name:'吐司定制',
							// 		src:OSS_HOST+'img/home_nav_4.png'
							// 	},
							// 	{
							// 		id:5,
							// 		name:'点心类',
							// 		src:OSS_HOST+'img/home_nav_5.png'
							// 	},
							// ];
							_this.data.nav = _this.data.property[0].sub;
							// let mx1 = []
							// let mx2 = []
							// let mx3 = []
							// let Ok = []
							// result.nav.forEach((x, index) => {
							// 	if (index <= 9) {
							// 		mx1.push(x)
							// 	} else if (index > 9 && index <= 19) {
							// 		mx2.push(x)
							// 	} else if (index > 19 && index <= 29) {
							// 		mx3.push(x)
							// 	}
							// })
							// console.log(mx1, mx2)

							// if (mx1.length > 0) {
							// 	Ok.push(mx1)
							// }
							// if (mx2.length > 0) {
							// 	Ok.push(mx2)
							// }
							// if (mx3.length > 0) {
							// 	Ok.push(mx3)
							// }

							// console.log(Ok)
							// _this.data.nav = Ok;



							// 企业介绍、资质
							_this.data.shangshi = result.shangshi || []
							_this.data.cert = result.cert || []
							// console.log(_this.data.property)
							
							_this.data.property.forEach(function(v) {
								_this.classList.push(v)
							})
							// let rent = {
							// 	id:'rent',
							// 	name:'租赁',
							// 	// type:'rent'
							// }

							// _this.classList.push(rent)
							_this.getProduct();
							
						}
						_this.skeletonShow = false;
					}
				};


				this.$service.GetApi(opt) //网络



			},
			getProduct() {
				const _this = this

				var opt = {
					url: '/index/getProduct',
					data: {
						property_id: this.property_id || '',
						lat: this.latitude || 22.81194,
						lng: this.longitude || 108.393005,
						page: ++_this.page
						// adv_channel:this.adv_channel
					},
					success: function(res) {

						if (res.status == 1) {
							let result = res.data
							_this.page = result.page
							_this.lastPage = result.last_page
							// console.log('*********',_this.property_id)
							if (_this.property_id) {
								// 点击了头部分类
								if (_this.page == 1) {
									_this.productList = result.list
								} else {
									_this.productList = _this.productList.concat(result.list)
								}
								// console.log(_this.productList)
								_this.propertyList = result.property
								_this.hotList = result.hotList
							} else {
								// 首页
								if (_this.page == 1) {
									_this.goodsList = result.list
								} else {
									_this.goodsList = _this.goodsList.concat(result.list)
								}
							}

							// console.log('******',_this.productList)



						}
						_this.skeletonShow = false;
					}
				};


				this.$service.GetApi(opt) //网络
			},
			/**
			 * 菜单导航滚动
			 */
			ScrollMenu(e) {
				let scrollLeft = e.target.scrollLeft;
				const query = uni.createSelectorQuery().in(this);
				query.select('.nav').boundingClientRect(data => {
					let wid = e.target.scrollWidth - data.width - (data.left * 2 + 5);
					this.slideNum = (scrollLeft / wid * 300) / 2;
				}).exec();
			},
			/**
			 * 搜索点击
			 */
			onSearch() {
				uni.navigateTo({
					url: '/pages/search/search'
				})
			},
			/**
			 * 扫一扫点击
			 */
			onCode() {
				uni.showToast({
					title: '开发中，尽情期待！',
					icon: 'none'
				})
				return
				// 只允许通过相机扫码
				uni.scanCode({
					onlyFromCamera: true,
					success: function(res) {
						// console.log('条码类型：' + res.scanType);
						// console.log('条码内容：' + res.result);
					}
				});
			},
			/**
			 * 分类点击
			 * @param {Object} item
			 * @param {Number} index
			 */
			onClassify(item, index) {
				if (item.id == 'rent') {
					this.tozhulin()
					return;
				} else if (item.id == 'activity') {
					let _this = this
					_this.$refer.setVilit('/pages/Activity/index')
					let callback = function(url) {
						_this.$refs.popupvLogin.open()
					}
					let data = {
						title: '每日特价'
					}
					_this.$refer.toUrl(callback, data)
				} else {
					// console.log(12121212)
					this.classifyShow = index;
					this.property_id = item.id > 0 ? item.id : '';
					this.page = 0;
					this.getProduct()
				}

			},
			toBannerUrl(item) {


				uni.navigateTo({
					url: item
				})
			},
			tozhulin() {

				uni.navigateTo({
					url: '/packagePlugin/pages/index'
				})
			},
			// 砍价列表
			toActivity() {
				if (!this.loginStatus) {
					this.$refs.popupvLogin.open()
					return
				}
				uni.navigateTo({
					url: '/pages/Bargain/index'
				})
			},
			toznyx() {
				if (!this.loginStatus) {
					this.$refs.popupvLogin.open()
					return
				}
				uni.navigateTo({
					url: '/packageHealthy/pages/main'
				})
			},
			toMost(title) {
				uni.navigateTo({
					url: '/pages/Activity/index?title=' + title

				})
			},
			tozhuanqu(row) {
				let _this = this
				_this.$refer.setVilit('/pages/ActivityXuetan/index')
				let callback = function(url) {
					_this.$refs.popupvLogin.open()
				}
				let data = {
					title: row.name,
					id: row.id
				}
				_this.$refer.toUrl(callback, data)
				// uni.navigateTo({
				// 	url: '/pages/ActivityXuetan/index?title='+title

				// })
			},
			toDetail(item){
				let _this = this
				_this.$refer.setVilit('/pages/SearchGoodsList/SearchGoodsList')
				let callback = function(url) {
					_this.$refs.popupvLogin.open()
				}
				let data = {
					property_id:item.id,
					name:item.name
				}
				_this.$refer.toUrl(callback, data)
			},
			onTips(type) {
				let _this = this

				let data = {}
				switch (type) {
					case 'shangshi':
						_this.title = '企业简介'
						_this.tips = _this.data.shangshi || []
						data = {
							title: '企业简介',
							list: JSON.stringify(_this.data.shangshi)
						}
						// _this.$refs.tipContent.open()
						break;
					case 'cert':
						_this.title = '资质认证'
						_this.tips = _this.data.cert || []
						data = {
							title: '资质认证',
							list: JSON.stringify(_this.data.cert)
						}
						// _this.$refs.tipContent.open()
						break;
				}
				_this.$refer.setVilit('/pages/CertDetail/index')
				let callback = function(url) {
					// _this.$refs.popupvLogin.open()
				}

				_this.$refer.toUrl(callback, data)
			},
			tohistory() {
				let _this = this
				_this.$refer.setVilit('/packageUser/pages/my/historyOrder/index')
				let callback = function(url) {
					_this.$refs.popupvLogin.open()
				}
				let data = {}
				_this.$refer.toUrl(callback, data)
			},
			/**
			 * 跳转点击
			 * @param {String} type 跳转类型
			 */
			onSkip(type, id = 0) {
				let _this = this
				switch (type) {
					case 'mess':
						uni.navigateTo({
							url: '/pages/Message/Message'
						})
						break;
					case 'paycode':
						uni.navigateTo({
							url: '/pages/Bargain/index'
						})
						// uni.navigateTo({
						// 	url: '/packagePlugin/pages/index'
						// })

						// uni.showToast({
						// 	icon: 'none',
						// 	title: '开发中...'
						// });
						// return;
						// uni.navigateTo({
						// 	url: '/pages/PaymentCode/PaymentCode'
						// })
						break;
					case 'menu':
						uni.navigateTo({
							url: '/pages/SearchGoodsList/SearchGoodsList'
						})
						break;
					case 'inform':
						break;
					case 'flash':
						uni.navigateTo({
							url: '/pages/FlashSale/FlashSale'
						})
						break;
					case 'GoodChoice':
						uni.navigateTo({
							url: '/pages/GoodChoice/GoodChoice'
						})
						break;
					case 'goods':
						_this.$refer.setVilit('/pages/GoodsDetails/GoodsDetails')
						let callback = function(url) {
							// _this.$refs.popupvLogin.open()
						}
						let data = {
							id: id,
						}
						_this.$refer.toUrl(callback, data)
						break;
				}
			}
		}
	};
</script>

<style scoped lang="scss">
	@import 'home.scss';
</style>